home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 1 / Amiga Tools.iso / egs-tools / egs_demo-version / egs_devels / c-include / egsblit.h < prev    next >
C/C++ Source or Header  |  1994-06-06  |  4KB  |  157 lines

  1. #ifndef EGS_EGSBLIT_H
  2. #define EGS_EGSBLIT_H
  3.  
  4. /***************************************************************************\
  5. *  $
  6. *  $ FILE     : egsblit.h
  7. *  $ VERSION  : 1
  8. *  $ REVISION : 1
  9. *  $ DATE     : 31-Jan-93 21:48
  10. *  $
  11. *  $ Author   : mvk
  12. *  $
  13. *****************************************************************************
  14. *                                                                           *
  15. * (c) Copyright 1990/93 VIONA Development                                   *
  16. *     All Rights Reserved                                                   *
  17. *                                                                           *
  18. \***************************************************************************/
  19.  
  20. #ifndef         EXEC_TYPES_H
  21. #include        <exec/types.h>
  22. #endif
  23. #ifndef         EXEC_PORTS_H
  24. #include        <exec/ports.h>
  25. #endif
  26. #ifndef         EGS_EGS_H
  27. #include        <egs/egs.h>
  28. #endif
  29.  
  30.  
  31. /*
  32.  * This library offers basic drawing functions.  These are especially func-
  33.  * tions that might later be implemented by a blitter in some future version
  34.  * of a graphics card.
  35.  *
  36.  * Therefore these functions should be used whenever possible.
  37.  *
  38.  * Moreover, the library forms the base for other libraries such as EGSLayers,
  39.  * EGSGfx and EGSIntui.  If the library is implemented for any other graphics
  40.  * card, the other libraries will run without change.
  41.  *
  42.  * Programs that abide by this convention face a safe future.
  43.  *
  44.  * In favour of speed, the library neglects heavier management.  Most func-
  45.  * tions are contained in one version with and one version without clipping.
  46.  * That clipping is rather rudimentary since it supports only one rectangle.
  47.  */
  48.  
  49.  
  50.  
  51. /*
  52.  * ClipRect, ClipRectPtr
  53.  *
  54.  * Definition of a clipping rectangle.  The values are inclusive, i.e. they
  55.  * are located inside the rectangle.
  56.  * The "Next" field is ignored by EGSBlit but used by EGSLayers.
  57.  */
  58.  
  59. typedef struct EB_ClipRect *EB_ClipRectPtr;
  60.  
  61. struct EB_ClipRect {
  62.  
  63.     EB_ClipRectPtr Next;
  64.     WORD Left, Top, Right, Bottom;
  65. };
  66.  
  67.  
  68.  
  69. /*
  70.  * ColorTable, Image
  71.  *
  72.  * Many times you use predefined images for icons.  As video organization is
  73.  * different in different video modes, images are stored in a general, bit-
  74.  * plane oriented way and can be inflated on need to different bit depths.
  75.  *
  76.  * To achieve this an array must be specified containing the colour values
  77.  * that are wanted for the image.
  78.  */
  79.  
  80. /* Note: differing from the Cluster .def file, ColorTable is defined as the
  81.    type contained in the color table instead of the array itself.  Thus
  82.    ColorTablePtr is declared differently, either.
  83. */
  84. typedef ULONG EB_ColorTable;
  85. typedef EB_ColorTable *EB_ColorTablePtr;
  86.  
  87. typedef struct EB_Image *EB_ImagePtr;
  88.  
  89. struct EB_Image {
  90.  
  91.     WORD Width, Height, Depth;
  92.     WORD Pad_1;
  93.     APTR Planes [8];
  94. };
  95.  
  96.  
  97.  
  98. /*
  99.  * ColorDes, ColorDesPtr
  100.  *
  101.  * Descriptor for text output.
  102.  *
  103.  * ColorDes
  104.  *  .Front       : Front pen colour.
  105.  *  .Back        : Back pen colour if transparent = FALSE.
  106.  *  .Transparent : if TRUE the background shines through "holes".
  107.  */
  108.  
  109. typedef struct EB_ColorDes *EB_ColorDesPtr;
  110.  
  111. struct EB_ColorDes {
  112.  
  113.     ULONG Front, Back;
  114.     UBYTE Transparent;
  115.     UBYTE Pad_1, Pad_2, Pad_3;
  116. };
  117.  
  118.  
  119.  
  120. /*
  121.  * ImageDesPtr, ImageDes
  122.  *
  123.  * Object description for "FillMask".
  124.  *
  125.  * ImageDes
  126.  *   .Colors   : Filling colours.
  127.  *   .Left,
  128.  *   .Top,
  129.  *   .Width,
  130.  *   .Height   : Borders of the object.
  131.  */
  132.  
  133. typedef struct EB_ImageDes *EB_ImageDesPtr;
  134.  
  135. struct EB_ImageDes {
  136.  
  137.     struct EB_ColorDes Colors;
  138.     WORD   Left, Top, Width, Height;
  139. };
  140.  
  141.  
  142.  
  143. /*
  144.  * Polygon, PolygonPtr
  145.  *
  146.  * Description of a polygon for PolygonFill.  The array size is not limited.
  147.  */
  148.  
  149. struct EB_Polygon {
  150.     WORD X, Y;
  151. };
  152.  
  153. typedef struct EB_Polygon *EB_PolygonPtr;
  154.  
  155. #endif /* EGS_EGSBLIT_H */
  156.  
  157.